package cn.iocoder.yudao.module.spot.controller.app;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.spot.entity.SpotEntity;
import cn.iocoder.yudao.module.spot.service.SpotService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import java.util.List;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Api(tags = "a用户 App - Spot")
@RestController
@RequestMapping("/spot")
@Validated
public class AppSpotController {

    @Resource
    private SpotService spotService;

    @GetMapping("/getlist")
    @ApiOperation("获取图斑列表信息")
    public CommonResult<List<SpotEntity>> getlist(int pageSize, int pageNum,SpotEntity spotEntity) {
        return success(spotService.getListByParams(pageSize,pageNum,spotEntity));
    }
}
